package cn.niit.pm.service.impl;

import cn.niit.pm.dao.SalaryMapper;
import cn.niit.pm.entity.Salary;
import cn.niit.pm.service.SalaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 薪资
 * @author xiaomi
 */
@Service
public class SalaryServiceImpl implements SalaryService {
    @Autowired
    private SalaryMapper salaryMapper;
    /**
     * 根据查询条件（已封装为salary对象），查询符合所有条件的薪资列表
     * @param salary
     * @return
     */
    @Override
    public List<Salary> selectListBySalary(Salary salary) {
        return salaryMapper.selectListBySalary(salary);
    }

    /**
     *根据薪资ID查询招聘信息
     * @param salaryId
     * @return
     */
    @Override
    public Salary selectBysalaryId(Integer salaryId) {
        return salaryMapper.selectBysalaryId(salaryId);
    }

    /**
     * 更新薪资列表
     * @param salary
     * @return
     */
    @Override
    public int updateSalary(Salary salary) {
        return salaryMapper.updateSalary(salary);
    }
}
